www.gusucode.com > VC 自编SQL数据库(服务端+客户端) > VC 自编SQL数据库(服务端+客户端)/code/www.NewXing.com/sql/Server/Msg.cpp
// Msg.cpp : implementation file // #include "stdafx.h" #include "miniSQL.h" #include "Msg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMsg IMPLEMENT_DYNCREATE(CMsg, CObject) CMsg::CMsg() { Init(); } CMsg::~CMsg() { } ///////////////////////////////////////////////////////////////////////////// // CMsg diagnostics #ifdef _DEBUG void CMsg::AssertValid() const { CObject::AssertValid(); } void CMsg::Dump(CDumpContext& dc) const { CObject::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CMsg message handlers void CMsg::Init() { m_cmdID = CONTINUED; m_nCount = -1; m_bClose = FALSE; m_msgList.RemoveAll(); } void CMsg::Serialize( CArchive& ar ) { if( ar.IsStoring() ) { ar << m_cmdID; ar << m_nCount; ar << (WORD)m_bClose; } else { ar >> m_cmdID; ar >> m_nCount; WORD wd; ar >> wd; m_bClose = (BOOL)wd; } m_msgList.Serialize(ar); }